package us.x.slowexp.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import us.x.slowexp.dao.PageExpressDao;
import us.x.slowexp.domain.Express;
import us.x.slowexp.domain.Page;

@Repository
public class PageExpressDaoImpl extends BaseDaoImpl<Express> implements PageExpressDao {
	public PageExpressDaoImpl(){
		this.setNs("us.x.slowexp.mapper.domain.page.");
	}

	public int queryCounts() {
		return (Integer) this.getSqlSession().selectOne(this.getNs() + "queryCounts");
	}

	public List<Express> queryExpress(Page page) {
		return this.getSqlSession().selectList(this.getNs() + "queryExpress", page);
	}
	
	public int queryHisCounts() {
		return (Integer) this.getSqlSession().selectOne(this.getNs() + "queryHisCounts");
	}

	public List<Express> queryHisExpress(Page page) {
		return this.getSqlSession().selectList(this.getNs() + "queryHisExpress", page);
	}
}
